import type { Ref, InjectionKey } from "vue";

export type SizeType = Ref<number>;

export type ChartListType = Ref<Array<number>>;

export type ChartTypeType = Ref<string>;

export type LockType = Ref<boolean>;

export type SelectionDataType = Ref<Record<string, Array<any>>>;

export type SelectionChangeCallBackType = (type: "factory" | "workbench", data: Array<any>) => void;

export type LockChangeCallBackType = (type: "factory" | "workbench", flag: boolean) => void;

export type ExportCallBackType = (type: "factory" | "workbench") => void;

export const WidthKey: InjectionKey<ChartListType> = Symbol("width");

export const HeightKey: InjectionKey<ChartListType> = Symbol("height");

export const ChartListKey: InjectionKey<ChartListType> = Symbol("chartList");

export const ChartTypeKey: InjectionKey<ChartTypeType> = Symbol("chartType");

export const SelectionChangeCallBackTypeKey: InjectionKey<SelectionChangeCallBackType> = Symbol("selectionChangeCallBackType");

export const LockChangeCallBackTypeKey: InjectionKey<LockChangeCallBackType> = Symbol("lockChangeCallBackType");

export const SelectionDataKey: InjectionKey<SelectionDataType> = Symbol("selectionDataType");

export const ExportCallBackTypeKey: InjectionKey<ExportCallBackType> = Symbol("exportCallBackType");

export const FactoryLockTypeKey: InjectionKey<LockType> = Symbol("factoryLockTypeType");

export const WorkbenchLockTypeKey: InjectionKey<LockType> = Symbol("workbenchLockTypeType");
